33 research outputs found

    Automatic generation of simplified weakest preconditions for integrity constraint verification

    Get PDF
    Given a constraint cc assumed to hold on a database BB and an update uu to be performed on BB, we address the following question: will cc still hold after uu is performed? When BB is a relational database, we define a confluent terminating rewriting system which, starting from cc and uu, automatically derives a simplified weakest precondition wp(c,u)wp(c,u) such that, whenever BB satisfies wp(c,u)wp(c,u), then the updated database u(B)u(B) will satisfy cc, and moreover wp(c,u)wp(c,u) is simplified in the sense that its computation depends only upon the instances of cc that may be modified by the update. We then extend the definition of a simplified wp(c,u)wp(c,u) to the case of deductive databases; we prove it using fixpoint induction

    Tree inclusions in windows and slices

    Get PDF
    PP is an embedded subtree of TT if PP can be obtained by deleting some nodes from TT: if a node vv is deleted, all edges adjacent to vv are also deleted, and outgoing edges are replaced by edges going from the parent of vv (if it exists) to the children of vv. Deciding whether PP is an embedded subtree of TT is known to be NP-complete. Given two trees (a target TT and a pattern PP) and a natural number ww, we address two problems: 1. counting the number of windows of TT having height exactly ww and containing pattern PP as an embedded subtree, and 2. counting the number of slices of TT having height exactly ww and containing pattern PP as an embedded subtree

    On relating CTL to Datalog

    Full text link
    CTL is the dominant temporal specification language in practice mainly due to the fact that it admits model checking in linear time. Logic programming and the database query language Datalog are often used as an implementation platform for logic languages. In this paper we present the exact relation between CTL and Datalog and moreover we build on this relation and known efficient algorithms for CTL to obtain efficient algorithms for fragments of stratified Datalog. The contributions of this paper are: a) We embed CTL into STD which is a proper fragment of stratified Datalog. Moreover we show that STD expresses exactly CTL -- we prove that by embedding STD into CTL. Both embeddings are linear. b) CTL can also be embedded to fragments of Datalog without negation. We define a fragment of Datalog with the successor build-in predicate that we call TDS and we embed CTL into TDS in linear time. We build on the above relations to answer open problems of stratified Datalog. We prove that query evaluation is linear and that containment and satisfiability problems are both decidable. The results presented in this paper are the first for fragments of stratified Datalog that are more general than those containing only unary EDBs.Comment: 34 pages, 1 figure (file .eps

    Multiple serial episode matching

    Get PDF
    12In a previous paper we generalized the Knuth-Morris-Pratt (KMP) pattern matching algorithm and defined a non-conventional kind of RAM, the MP--RAMs (RAMS equipped with extra operations), and designed an O(n)O(n) on-line algorithm for solving the serial episode matching problem on MP--RAMs when there is only one single episode. We here give two extensions of this algorithm to the case when we search for several patterns simultaneously and compare them. More preciseley, given q+1q+1 strings (a text tt of length nn and qq patterns m1,,mqm_1,\ldots,m_q) and a natural number ww, the {\em multiple serial episode matching problem} consists in finding the number of size ww windows of text tt which contain patterns m1,,mqm_1,\ldots,m_q as subsequences, i.e. for each mim_i, if mi=p1,,pkm_i=p_1,\ldots ,p_k, the letters p1,,pkp_1,\ldots ,p_k occur in the window, in the same order as in mim_i, but not necessarily consecutively (they may be interleaved with other letters).} The main contribution is an algorithm solving this problem on-line in time O(nq)O(nq)

    The algebra of binary trees is affine complete

    Full text link
    A function on an algebra is congruence preserving if, for any congruence, it maps pairs of congruent elements onto pairs of congruent elements. We show that on the algebra of binary trees whose leaves are labeled by letters of an alphabet containing at least three letters, a function is congruence preserving if and only if it is polynomial.Comment: 9 pages, 1 figur

    Some fixpoint techniques in algebraic structures and applications to computer science

    No full text
    corecore